<template>
  <div>
<!--    <h2>子组件哈哈哈</h2>-->
<!--    <h2>{{ msg }}</h2>-->
    <input type="text" @input="handelInput">
  </div>
</template>

<script>
  export default {
    name: "TestChild",
    props: {
      msg: {
        type: String,
        default: ""
      }
    },
    methods: {
      handelInput(event) {
        let value = event.target.value;
        this.$emit("input", value);
      }
    }
  }
</script>

<style scoped>

</style>
